package com.wm.machine.baselibrary.utils.zxing.manager;

/**
 * Author：     cxp
 * CreatTime：  2017/8/24
 * ContactInfo：
 * Description: 扫码控制常量
 */

public class DecodeControlUtil {

    private static boolean DECODE_1D_PRODUCT = true; //1D_PRODUCT
    private static boolean DECODE_1D_INDUSTRIAL = true; //1d
    private static boolean DECODE_QR = true; //qr
    private static boolean DECODE_DATA_MATRIX = true; //data_matrix
    private static boolean DECODE_AZTEC = false; //aztec
    private static boolean DECODE_PDF417 = false; //pdf417

    private static boolean SCREEN_PROTRAIT = true; //是否横屏扫码
    private static boolean PLAY_BEEP = true; //解码成功播放提示音
    private static boolean VIBRATE = true; //解码成功震动
    private static int FRONT_LIGHT_MODE = 0; //闪光灯
    private static boolean BULK_MODE = false; // 批量扫描
    private static boolean AUTO_FOCUS = true; //自动对焦
    private static boolean INVERT_SCAN = false; //反色（黑色背景白色二维码）（部分支持）
    private static boolean DISABLE_AUTO_ORIENTATION = false; //禁用自动旋转
    private static boolean DISABLE_CONTINUOUS_FOCUS = true; //不持续对焦
    private static boolean DISABLE_EXPOSURE = true; //不曝光
    private static boolean DISABLE_METERING = true; //不进行距离测量
    private static boolean DISABLE_BARCODE_SCENE_MODE = true; //不进行条形码匹配

    public static boolean isPlayBeep() {
        return PLAY_BEEP;
    }

    public static int getFrontLightMode() {
        return FRONT_LIGHT_MODE;
    }

    public static boolean isBulkMode() {
        return BULK_MODE;
    }

    public static boolean isAutoFocus() {
        return AUTO_FOCUS;
    }

    public static boolean isInvertScan() {
        return INVERT_SCAN;
    }

    public static boolean isDisableAutoOrientation() {
        return DISABLE_AUTO_ORIENTATION;
    }

    public static boolean isDisableContinuousFocus() {
        return DISABLE_CONTINUOUS_FOCUS;
    }

    public static boolean isDisableExposure() {
        return DISABLE_EXPOSURE;
    }

    public static boolean isDisableMetering() {
        return DISABLE_METERING;
    }

    public static boolean isDisableBarcodeSceneMode() {
        return DISABLE_BARCODE_SCENE_MODE;
    }

    public static boolean isDecode1dProduct() {
        return DECODE_1D_PRODUCT;
    }

    public static boolean isDecode1dIndustrial() {
        return DECODE_1D_INDUSTRIAL;
    }

    public static boolean isDecodeQr() {
        return DECODE_QR;
    }

    public static boolean isDecodeDataMatrix() {
        return DECODE_DATA_MATRIX;
    }

    public static boolean isDecodeAztec() {
        return DECODE_AZTEC;
    }

    public static boolean isDecodePdf417() {
        return DECODE_PDF417;
    }

    public static boolean isVIBRATE() {
        return VIBRATE;
    }

    public static boolean isScreenProtrait() {
        return SCREEN_PROTRAIT;
    }
}
